﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="VideosAdd.aspx.vb" Inherits="VW_Passat_Community.VideosAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .st
        {
            font-size: medium;
        .style2
        {
            color: #3399FF;
        }
        .style3
        {
            font-size: x-large;
        }
        .style4
        {
            font-size: medium;
            color: #3399FF;
        }
        .guide
        {
            color: #696969;
        }
        .style5
        {
            color: #696969;
            font-size: small;
        }
        .style6
        {
            color: #FF0000;
        }
        .newVideoObjects
        {
            height: 1304px;
        }
        .listOfNewVideos
        {
            height: 1118px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="bluecontent">
        <h1 class="headline3">
            Videos &amp; Media Forum</h1>
        <br />
        When you come to a website that displays forums, you dont want to simply just see
        text throughout the site, you want to see videos to learn about new things and explore.<br />
        <br />
        Volkswagen Passat Community shows the most amazing and helpful videos to guide our
        visitors and registered users whenever they are stuck on a specific stage.<br />
        <br />
        E.g. If your changing a lightbulb and you manage to get the lightbult out but cant
        get the new one in, our videos will show you and guide you through the simple steps
        to get you going on your feet.
        <br />
        <br />
        <div id="transparent">
            <p style="font-size: small; font-style: italic; color: #FF0000; font-weight: 700;
                text-align: justify;">
                Note. The videos do not belong us but have been added onto our site by our registeres
                users who have access to simply enter the Youtube URL and the vdieo will be embedded
                into our site.
            </p>
        </div>
    </div>
    <br />
    <div class="style4">
        <strong>Instructions</strong> - <em>How to add a new Video</em><div class="style5">
            To add a new video, follow three simple steps.<br />
            <br />
            1. Search for a Video on YouTube and Copy the Code of the Video from your browser
            in the URL. e.g. <a href="https://www.youtube.com/watch?v=dt4DayDLdcQ">http://www.youtube.com/watch?v=<span
                class="style6">dt4DayDLdcQ</span></a><span class="style6"><br />
                </span>&nbsp;&nbsp; Copy the Code highlighted in red from your browser and enter
            it in the text box below.<br />
            <br />
            2. Fill out rest of the details of the video - Title and Description.<br />
            <br />
            3. Click on Save, sit back and enjoy watching.</div>
    </div>
    <br />
    <div class="newVideoObjects">
        <strong>&nbsp; Video ID:</strong><br />
        &nbsp;
        <asp:TextBox ID="txtvideid" runat="server" Font-Names="Calibri" Width="221px"></asp:TextBox>
        <br />
        <br />
        <strong>&nbsp; Video Title:<br />
            &nbsp;
            <asp:TextBox ID="txtvideotitle" runat="server" Font-Names="Calibri" Width="288px"></asp:TextBox>
            <br />
            <br />
            &nbsp; Video Description:<br />
            &nbsp;
            <asp:TextBox ID="txtvideodescription" runat="server" Font-Names="Calibri" Height="61px"
                TextMode="MultiLine" Width="374px"></asp:TextBox>
            &nbsp;
            <asp:Button ID="btnAddVideo" runat="server" Text="Add Video" Width="89px" CssClass="buttons" />
            <br />
            <br />
        </strong>
        <div class="listOfNewVideos">
            <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
                <AlternatingItemTemplate>
                    <strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                    <br />
                    <strong>Description:</strong>
                    <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                    <br />
                    <strong>Video Posted by:</strong> <a href="MyVolkswagen.aspx?Username=<%# Eval("UserName") %>">
                        <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                    <br />
                    <br />
                    </span>
                </AlternatingItemTemplate>
                <EditItemTemplate>
                    <span style=""><strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:TextBox ID="VideoDescriptionTextBox" runat="server" Text='<%# Bind("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                        <br />
                        <strong>Video Posted by:</strong> <a href="MyVolkswagen.aspx?Username=<%# Eval("UserName") %>">
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                        <br />
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                        <br />
                        <br />
                    </span>
                </EditItemTemplate>
                <EmptyDataTemplate>
                    <span>No Videos added.</span>
                </EmptyDataTemplate>
                <InsertItemTemplate>
                    <span style=""><strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:TextBox ID="VideoDescriptionTextBox" runat="server" Text='<%# Bind("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                        <br />
                        <strong>Video Posted by:</strong> <a href="MyVolkswagen.aspx?Username=<%# Eval("UserName") %>">
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                        <br />
                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                        <br />
                        <br />
                    </span>
                </InsertItemTemplate>
                <ItemTemplate>
                    <strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                    <br />
                    <strong>Description:</strong>
                    <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                    <br />
                    <strong>Video Posted by:</strong> <a href="MyVolkswagen.aspx?Username=<%# Eval("UserName") %>">
                        <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                    <br />
                    <br />
                    </span>
                </ItemTemplate>
                <LayoutTemplate>
                    <div id="itemPlaceholderContainer" runat="server" style="">
                        <span runat="server" id="itemPlaceholder" />
                    </div>
                    <div style="">
                        <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                                <asp:NumericPagerField />
                                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                            </Fields>
                        </asp:DataPager>
                    </div>
                </LayoutTemplate>
                <SelectedItemTemplate>
                    <span style=""><strong>Title:</strong> <a href="VideoPlay.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                        <br />
                        <strong>Video Posted by:</strong> <a href="MyVolkswagen.aspx?Username=<%# Eval("UserName") %>">
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                        <br />
                        <br />
                    </span>
                </SelectedItemTemplate>
            </asp:ListView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT Videos.VideoID, Videos.VideoLink, Videos.VideoTitle, Videos.VideoDescription, Videos.DateUploaded, Videos.TimeUploaded, aspnet_Users.UserName FROM (aspnet_Users INNER JOIN Videos ON aspnet_Users.UserId = Videos.UsernameID) ORDER BY Videos.VideoID DESC">
            </asp:SqlDataSource>
        </div>
    </div>
    <br />
</asp:Content>
